<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>数据库备份</title>
<link href="__PUBLIC__/style/style.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/js/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
function show()
{
  $("#zdy").show();
}
function hide()
{
  $("#zdy").hide();
}
</script>
</head>
<body id="page">
<h2 class="tag">当前位置：网站设置&nbsp;&gt;&nbsp;系统设置 &gt; 数据库备份</h2>
<div class="box">
  <div class="page_menu">
    	<a href="__APP__/set">网站信息</a><a href="__APP__/set/core">核心设置</a><a href="__APP__/dbback">数据库备份</a>
  </div>

  <div class="db">├备份数据</div>
  <div class="infobox">
    <form action="__URL__/backup" method="post" >
  	<table width="100%" border="1" align="center" cellpadding="3" cellspacing="1" class="table_b">
    <tbody>
    <tr onmouseover="this.bgColor='#d1e6f5';" onmouseout="this.bgColor='#fff';" bgcolor="#fff">
      <td align="left" width="210"><label><input name="back" type="radio" value="1" id="ball" checked="checked" onclick="hide()" class="radio">全部备份</label></td>
      <td align="left">备份数据库所有表</td>
    </tr>
    <tr onmouseover="this.bgColor='#d1e6f5';" onmouseout="this.bgColor='#fff';" bgcolor="#fff">
      <td align="left" width="210"><label><input name="back" type="radio" value="0" id="cus" onclick="show()" class="radio">自定义备份</label></td>
      <td align="left">根据需要自行选择备份数据表</td>
    </tr>
    <tr bgcolor="#fff">
      <td colspan="2" id="zdy" style="display:none">
        <div class="zdy radio">
          {loop $table $key $vo}
          <span><label><input name="table[]" type="checkbox" value="{$vo}" /> {$vo}</label></span>
          {/loop}
        </div>
      </td>
    </tr>
    <tr onmouseover="this.bgColor='#d1e6f5';" onmouseout="this.bgColor='#fff';" bgcolor="#fff">
      <td align="left" width="210" class="radio"><b class="radio">备份数据大小</b></td>
      <td align="left"><input type="text" class="txtr" name="size" value="2048"></td>
    </tr>
    <tr bgcolor="#fff">
      <td colspan="2"><input type="submit" value="开始备份" class="button" style="margin-left:230px;"></td>
    </tr>
    </tbody>
   </table>
   </form>
  </div>

  <div class="db">├恢复数据</div>
  <div class="infobox">
    <table width="100%" border="1" align="center" cellpadding="3" cellspacing="1" class="table_b">
    <tbody>
    <tr class="table_style_even">
      <td align="center" width="20%">文件名称</td>
      <td align="center" width="10%">文件大小</td>
      <td align="center" width="20%">备份日期</td>
      <td align="center" width="15%">管理操作</td>
    </tr>
    <tr onmouseover="this.bgColor='#d1e6f5';" onmouseout="this.bgColor='#fff';" bgcolor="#fff">
      {loop $list $key $vo}
      <td align="center">{$vo['name']}</td>
      <td align="center">{$vo['size']} KB</td>
      <td align="center">{date('Y-m-d H:i:s',$vo['time'])}</td>
      <td align="center"><a href="__URL__/recover?path=../data/dbback/" class="edt" onClick="return confirm('导入后当前所有数据将被覆盖！确定要导入数据？')">导入</a> | <a href="__URL__/del?file={$vo['name']}" onClick="return confirm('删除后数据不能恢复！确定要删除？')">删除</a></td>
      {else}
      <td  colspan="4" align="center">暂无数据</td>
      {/loop}
    </tr>
    </tbody>
   </table>
  </div>
</div>
</body>
</html>
